<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Order extends Model
{
	const PAY_WAY_WECHAT = 1;//微信支付
	const PAY_WAY_ALIPAY = 2;//支付宝支付
	const PAY_WAY_BANK = 3;//银行卡支付
	
	const PAY_WAY_WECHAT_STRING = '微信支付';//微信支付
	const PAY_WAY_ALIPAY_STRING = '支付宝支付';//支付宝支付
	const PAY_WAY_BANK_STRING = '银行卡支付';//银行卡支付
	
	protected $table = 'sys_order';
	protected $primaryKey = 'order_id';
	public $timestamps = false;
	
	
	protected $fillable = [
			'id','order_id', 'enterprise_id','order_code','recharge_amount','recharge_number',
			'payment_method','recharge_account','order_time','invalid_time','remark','state',
	        'create_by','create_date','del_flag'
	];
	
	public static function getPayWayMap()
	{
		return [
				self::PAY_WAY_WECHAT => self::PAY_WAY_WECHAT_STRING,
				self::PAY_WAY_ALIPAY => self::PAY_WAY_ALIPAY_STRING,
				self::PAY_WAY_BANK => self::PAY_WAY_BANK_STRING,
		];
	}
	
}
